package com.ibeeking.found.upms.service.common.param;

import com.ibeeking.nematos.utils.base.BaseValidationGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @ClassName GlobalPermissionParam
 * @Description
 * @Author ibeeking
 * @Date 2020-12-01 18:15
 **/
@Data
public class PermissionParam implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @NotNull(message = "Id不能为空", groups = {BaseValidationGroup.Update.class})
    private Long id;

    /**
     * 父级id
     */
    @NotNull(message = "父级id不能为空", groups = {BaseValidationGroup.Insert.class})
    private Long parentId;
    /**
     * 行业类型:mall=电商平台；mdi=制造业
     */
    @NotBlank(message = "所属行业类型不能为空", groups = {BaseValidationGroup.Insert.class})
    private String industry;

    /**
     * 模块
     */
    @NotBlank(message = "所属模块不能为空", groups = {BaseValidationGroup.Insert.class})
    private String module;

    /**
     * 菜单名称
     */
    @NotBlank(message = "菜单名称不能为空", groups = {BaseValidationGroup.Insert.class, BaseValidationGroup.Update.class})
    private String name;

    /**
     * icon
     */
    private String icon;

    /**
     * 菜单路径
     */
    private String route;

    /**
     * 按钮权限
     */
    private String permission;

    /**
     * 打开类型，1-内部链接页面，2-外部链接页面
     */
    //@NotNull(message = "打开类型不能为空", groups = {BaseValidationGroup.Insert.class, BaseValidationGroup.Update.class})
    private Integer routeType;

    /**
     * 1-目录，2-菜单，3-按钮
     */
    @NotNull(message = "菜单类型不能为空", groups = {BaseValidationGroup.Insert.class,BaseValidationGroup.Update.class})
    private Integer type;

    /**
     * 打开方式，1-页签，2-新页面
     */
    //@NotNull(message = "打开方式不能为空", groups = {BaseValidationGroup.Insert.class, BaseValidationGroup.Update.class})
    private Integer target;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = {BaseValidationGroup.Insert.class, BaseValidationGroup.Update.class})
    private Integer sort;

    /**
     * 备注
     */
    private String remark;

    private Long createBy;

    private Long modifyBy;
}
